import { NestFactory } from '@nestjs/core';
import { FastifyAdapter,NestFastifyApplication } from '@nestjs/platform-fastify';
import { AppModule } from './app.module';
/**
 * fastify服务器启动入口
 */
async function bootstrap() {
  //添加Fastify适配器
  const app = await NestFactory.create<NestFastifyApplication>(AppModule,new FastifyAdapter());
  /**
   *默认情况下，Fastify只在localhost 127.0.0.1接口上监听。如果您想接受其他主机上的连接，则应该在Listen()调用中指定‘0.0.0.0’：
  */
  await app.listen(3000, '0.0.0.0');
}
bootstrap();
